////////////////////////////////////////////////////////////////////////////////
//                            INITS                                           //
////////////////////////////////////////////////////////////////////////////////

var fx_poisson_mix = null;

var window_w = 0;
var window_h = 0; 

var bg_img_w = 0;
var bg_img_h = 0;
var delta = 0;


////////////////////////////////////////////////////////////////////////////////
//                            EVENEMENTS                                      //
////////////////////////////////////////////////////////////////////////////////

onload = function(){
    correctPNG();
    fx_poisson_mix = new Fx.Styles('poisson_mix', {duration: 500, wait: false});
    
    bg_img_w = document.getElementById("poisson_mix").width;
    bg_img_h = document.getElementById("poisson_mix").height;
    delta = bg_img_w/bg_img_h;
    
    resizeBg();
}

onresize = resizeBg;



////////////////////////////////////////////////////////////////////////////////
//                            FONCTIONS                                       //
////////////////////////////////////////////////////////////////////////////////

function resizeBg(){ 
    var arVersion = navigator.appVersion.split("MSIE")
    var version = parseFloat(arVersion[1])
    
    window_h = document.getElementById("zone_fond").offsetHeight;
    window_w = document.getElementById("zone_fond").offsetWidth;
    
    fx_poisson_mix.start({
		'width': window_h*delta,
		'height': window_h
	});

}

